<?php
$host = "127.0.0.1";
$user = "root";
$pass = "";
$dbname ="hzk";
// 创建连接
$conn = new mysqli($host, $user, $pass, $dbname);
$conn->query("set names utf8");
// 检测连接
//if ($conn->connect_error) {
   // die("连接失败: " . $conn->connect_error);
//} 
//echo "连接成功";
//